<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8" />
  <meta name="viewport" content="width=device-width, initial-scale=1.0" />
  <title>Document</title>
</head>

<body>
  <script>
    function foo() { }
    let f1 = new foo();
    //   console.log(f1.__proto__ == foo.prototype);//true
    //   console.log(foo == foo.prototype.constructor);//true
    console.log(f1.prototype);

    Function.prototype.a = function () {
      console.log("a");
    };

    //   console.log(foo.prototype.__proto__);
    console.log(Function.prototype.__proto__ == Object.prototype);

    let obj = {
      a: 1,
    };
    let arr = [1, 2];
    //   console.log(obj.toString());//[object Object]
    //   console.log(arr.toString());//1,2
    console.log(obj.valueOf()); //{a:1}
    console.log(arr.valueOf());
  </script>
</body>

</html>